import proxy.Action;
import proxy.Assistant;
import proxy.PlayerA;

/**
 * Description:
 * Designer: jack
 * Date: 2017/8/2
 * Version: 1.0.0
 */
public class Coach {

    public static void main(String args[]) {

//        PlayerB playerB = new PlayerB();
//        proxy.Captain captain = new proxy.Captain(playerB);
//        captain.attack();
//
//        PlayerA playerA = new PlayerA();
//        captain = new proxy.Captain(playerA);
//        captain.defend();

        //助理，准备给A球员下达指令。
        Assistant<Action> actionAssistant = new Assistant<>(PlayerA.class);
        Action action = actionAssistant.getProxyInstance();

        //让A球员进攻
        action.attack();
    }

}
